import request from '@/utils/request'
import {parseStrEmpty} from "../../utils/ruoyi";

// 查询挂号列表
export function listRegistered(query) {
  return request({
    url: '/registered/registered/list',
    method: 'get',
    params: query
  })
}

// 查询挂号详细
export function getRegistered(registeredId) {
  return request({
    url: '/registered/registered/' + parseStrEmpty(registeredId),
    method: 'get'
  })
}
export function getRegistered1(deptId) {
  return request({
    url: '/registered/registered/' + parseStrEmpty(deptId),
    method: 'get'
  })
}

// 新增挂号
export function addRegistered(data) {
  return request({
    url: '/registered/registered',
    method: 'post',
    data: data
  })
}

// 修改挂号
export function updateRegistered(data) {
  return request({
    url: '/registered/registered',
    method: 'put',
    data: data
  })
}

// 删除挂号
export function delRegistered(registeredId) {
  return request({
    url: '/registered/registered/' + registeredId,
    method: 'delete'
  })
}
// 查询部门下拉树结构
export function deptTreeSelect() {
  return request({
    url: '/registered/registered/deptTree',
    method: 'get'
  })
}
export function listRegisteredDate(){
  return request({
    url: '/registered/registered/data',
    method: 'get',
  })
}
export function getDateList(){
  return request({
    url: '/registered/registered/datalist',
    method: 'get',
  })
}
export function changeRegistered(registeredId){
  return request({
    url: '/registered/registered/' + registeredId,
    method:'put',
  })
}


